import instance from "@/utils/request";

// 登录接口'/user/login'，请求方式post,参数为username和password，写成箭头函数形式
export const loginApi = (username, password) => {
  return instance.post('/user/login', { username, password })
}

// 登录接口'/user/register'，请求方式post,参数为username和password，写成箭头函数形式
export const registerApi = (username, password) => {
  return instance.post('/user/register', { username, password })
}